package com.lindong.springbootconsumer.listenner;

/**
 * @author LinDong
 * @date 2021/4/10 23:14
 */

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
@Component
public class MyListenner {
    /**
     * 监听某个队列的消息
     * @param message 接收到的消息
     */
    @RabbitListener(queues = "item_queue")
    public void MyListenner1(String message) {
        System.out.println("消费者接收到的消息为：" + message);
    }
}
